#include<iostream>
#include<csignal>

using namespace std;

void handler(int sig)
{
    cout<<"i am is: "<<sig<<endl;
}

int main()
{
    //捕捉信号
    signal(2,handler);

    cout<<"begin"<<endl;
    raise(2);
    // cout<<"你好！"<<endl;
    return 0;
}
